const React = require( 'react' );
const { View, StyleSheet,Platform } = require( 'react-native' );
const {
    JDDevice,
    JDText,
    JDRouter,
} = require( '@areslabs/jdreact-core-lib' );
const { NavigationBar } = JDRouter;

class PlatformExample extends React.Component {
    render() {
        return (
            <View style={styles.wrapper}>
                <NavigationBar Title="Platform"/>
                <View style={styles.content}>
                    <JDText style={styles.text}>
                        当前平台为：{Platform.OS}。 Platform.OS在iOS上会返回ios，而在Android设备或模拟器上则会返回android，在web平台上回返回web。
                    </JDText>
                </View>
            </View>
        );
    }
}

const styles = StyleSheet.create({
    wrapper: {
        flex: 1,

    },
    content:{
        height:JDDevice.height,
        justifyContent:'center',
        alignItems:'center',
        paddingRight:20,
        paddingLeft:20,
    },
    text:{
        fontSize:JDDevice.getFontSize(40)
    },

});

module.exports = PlatformExample;
